package com.mdd.common.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mdd.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = true)
@TableName("order_pay_info")
@ApiModel("订单支付信息实体")
public class OrderPayInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Long id;

    @ApiModelProperty(value = "编号")
    private String orderNo;

    @ApiModelProperty(value = "支付类型 0支付宝 1微信")
    private Long payType;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal payMony;

    @ApiModelProperty(value = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ApiModelProperty(value = "优惠信息编号")
    private String discountNo;

    @ApiModelProperty(value = "优惠类型")
    private Integer discountType;

    @ApiModelProperty(value = "支付状态 0 未支付 1已支付")
    private Long payStatus;

    @ApiModelProperty(value = "订单支付编号")
    private String payInfoNo;

}
